﻿using System;
using System.Collections.Generic;
using System.Data;
using TrafficArchives.Common;

namespace TrafficArchives.DataAccess
{
    /// <summary>
    /// 读取部门信息。
    /// </summary>
    public class DepartmentDb : DbBase
    {
        public override PaginationData<DataTable> GetData(Request request)
        {
            var ret = new PaginationData<DataTable>();
            const string sql = @"select * from v_department t";
            ret.Data = ExecuteDataTable(sql);
            ret.Data.PrimaryKey = new[] { ret.Data.Columns["id"] };
            return ret;
        }

        public DataTable GetData()
        {
            return GetData(new Request()).Data;
        }

        /// <summary>
        /// 无
        /// </summary>
        /// <param name="data"></param>
        public override void Add(DataTable data)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 无
        /// </summary>
        /// <param name="data"></param>
        public override void Update(DataTable data)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 无
        /// </summary>
        /// <param name="ids"></param>
        public override void Delete(List<string> ids)
        {
            throw new NotImplementedException();
        }
    }
}